package com.example.testdemo.level3;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.example.testdemo.R;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by MrYan on 2018/8/7.
 * 三级折叠列表的实现
 */

public class LevelThreeListActivity extends Activity {
    private RecyclerView recyclerView;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_three_level);
        recyclerView = findViewById(R.id.recyclerView);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        List<String> data = new ArrayList<>();
        data.add("第一个公司名");
        data.add("第二个公司名");
        LevelThreeAdapter adapter = new LevelThreeAdapter(this,data);
        recyclerView.setAdapter(adapter);
    }
}
